Repository navigation
fix(interpreter): redirection errors read like bash - #2611
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
bashkit | a9372b2 | Oct 07 2026, 11:14 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 04592e0 | Commit Preview URL Branch Preview URL |
Oct 08 2026, 02:07 AM |
Three gaps in what a failed redirect prints. The diagnostic had no line number, so a script could not tell which redirect failed. The in-memory backend's lowercase "is a directory" reached stderr instead of the strerror text bash prints. And a target written with a trailing slash created a file under the stripped name instead of failing, so `echo x > nodir/` silently made a file called `nodir`. Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/redirect-error-wording
branch
from
October 8, 2026 02:06
a9372b2 to
04592e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Михайло · project thread
What changed
A redirection that cannot be opened now reports the way bash does:
is a directoryis capitalized to the strerror text bash printsecho x > nodir/fails instead of creating a file namednodirWhy
A script that redirects into a path it did not create could not tell which
redirect failed, and the trailing-slash case failed silently in the worst
direction: bashkit created a file where the script meant a directory, so
later reads found data in a place bash would have left empty.
Before / After
line 3: f.txt: cannot overwrite existing filebash: f.txt: cannot overwrite existing filebash: line 3: f.txt: cannot overwrite existing fileline 6: d: Is a directorybash: d: is a directorybash: line 6: d: Is a directoryline 7: nodir/: Is a directory, status 1nodir)bash: line 7: nodir/: Is a directory, status 1bash names the running script where bashkit says
bash:; the interpreter doesnot track a script path, which is a separate known gap.
Risk
Low, but the message text is user-visible. Three existing tests asserted the
old unprefixed form and were updated. The fuzz leak detector's template match
keys on the
bash:prefix and the reason suffix, both unchanged, so it stillrecognizes these lines as shell echoes rather than internal leaks.
Checklist
cargo test -p bashkit --lib(2859 passed)cargo test -p bashkit --test integration(1356 passed)bash_comparisondifferential tests against real bashcargo clippy -p bashkit --all-targets -- -D warningscargo fmt --all --checkcargo test -p bashkit-cli(56 passed)just check-okf,just check-doc-linkslog.md)https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code